#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <assert.h>
char* s_strstr(const char* str1, const char* str2)
{
	assert(str1 && str2);
	char* cur= (char*)str1;
	if (*str2=='\0')
	{
		return (char*)str1;
	}
	while (*cur)
	{
		char* s1 = cur;
		char* s2 = (char*)str2;
		while(*s1==*s2&&*s1!='\0'&&*s2!='\0')
		{
			s1++;
			s2++;
		}
		if (*s2 == '\0')
		{
			return cur;
		}
		cur++;
	}
	return NULL;
}
int main()
{
	char arr1[] = "abcccdefgh";
	char arr2[] = "cde";
	char* q=s_strstr(arr1, arr2);
	printf("%s", q);
	return 0;
}